<?php

class ProductPeer extends BaseProductPeer
{
	public static function getKijker()
	{
		$c = new Criteria();

		$c->add(self::FOCUS,1);

		$c->addAscendingOrderByColumn('RAND()');

		return self::doSelectOne($c);
	}

	public static function getTop($limit = 5)
	{
		$c = new Criteria();

		$c->addDescendingOrderByColumn(self::CLICKS);
		$c->setLimit($limit);

		return self::doSelect($c);
	}

	public static function getByCategory($category)
	{
		$c = new Criteria();

		$c->add(self::CATEGORY_ID,$category->getId());

		$c->addDescendingOrderByColumn(self::NAME);

		return self::doSelect($c);
	}
}
